<?php
if ($this->type == 'article')
    $routes = array('Article/default/listByCategory','Article/default/view');
elseif ($this->type == 'product')
    $routes = array('Product/default/listByCategory','Product/default/view');
elseif ($this->type == 'document')
    $routes = array('Site/documents/listByCategory','Site/documents/view');   
?>
<div class="<?php echo $this->cssClass; ?>">
    <h3 class="title"><?php echo $this->heading; ?></h3>
    <ul class="left-menu">
    <?php foreach($models as $model) : ?>
        <li class="<?php if (in_array($this->controller->route,$routes) && in_array($model->id,$this->hieCatIds)) echo 'active'; ?>"><a href="<?php echo Yii::app()->createUrl($routes[0],array('locale'=>$model->localeCategory->locale,'id'=>$model->id,'alias'=>$model->localeCategory->alias)) ?>"><?php echo $model->localeCategory->title; ?></a></li>
    <?php endforeach; ?>
    </ul>
</div>